Map Business Online SDK
UpdateData(String,String,String,ICancelTracker,String,UpdateDataOptions,String,FieldCustomization[]) Method

MBO.Server Namespace > IServer Interface > UpdateData Method : UpdateData(String,String,String,ICancelTracker,String,UpdateDataOptions,String,FieldCustomization[]) Method
Name of map that contains layer you want to update.
ID or name of layer to update. If more than one layer is found with specified ID or name then SDK will throw MBO.MBOException with MBO.ErrorCode.AmbiguousLayerIdOrName error code.
Path to file with new data.
Cancellation tracker. Optional. You can provide custom solution to break time-consuming processing. See ICancelTracker interface.
Table/sheet name inside the file. Optional. You need to specify table/sheet name only when you plot an Excel file with multiple worksheets or ranges inside. Default value is null (Nothing in Visual Basic).
Data update options. Optional. Default value is MBO.UpdateDataOptions.None.
Folder where specified map is located. Optional. Default value is MBO.MapFolder.MyMaps.
Specifies what fields to add in data update and their customizations (fields that exist in the file but not in the layer). Optional. Applicable only if options includes MBO.UpdateDataOptions.AddNew. If this parameter value is not set then all new fields will be added to the layer. If you want instead to skip all fields then pass empty array in this parameter. To include a field without customization just set field's MBO.FieldCustomization.Name property in the parameter.
Updates data of the layer from specified file.
Syntax
'Declaration
 
Overloads Function UpdateData( _
   ByVal mapName As String, _
   ByVal layerIdOrName As String, _
   ByVal filePath As String, _
   Optional ByVal cancelTracker As ICancelTracker, _
   Optional ByVal tableName As String, _
   Optional ByVal options As UpdateDataOptions, _
   Optional ByVal mapFolder As String, _
   Optional ByVal newFields() As FieldCustomization _
) As UpdateDataSummary

Parameters

mapName
Name of map that contains layer you want to update.
layerIdOrName
ID or name of layer to update. If more than one layer is found with specified ID or name then SDK will throw MBO.MBOException with MBO.ErrorCode.AmbiguousLayerIdOrName error code.
filePath
Path to file with new data.
cancelTracker
Cancellation tracker. Optional. You can provide custom solution to break time-consuming processing. See ICancelTracker interface.
tableName
Table/sheet name inside the file. Optional. You need to specify table/sheet name only when you plot an Excel file with multiple worksheets or ranges inside. Default value is null (Nothing in Visual Basic).
options
Data update options. Optional. Default value is MBO.UpdateDataOptions.None.
mapFolder
Folder where specified map is located. Optional. Default value is MBO.MapFolder.MyMaps.
newFields
Specifies what fields to add in data update and their customizations (fields that exist in the file but not in the layer). Optional. Applicable only if options includes MBO.UpdateDataOptions.AddNew. If this parameter value is not set then all new fields will be added to the layer. If you want instead to skip all fields then pass empty array in this parameter. To include a field without customization just set field's MBO.FieldCustomization.Name property in the parameter.

Return Value

Information on data update.
See Also

Reference

IServer Interface
IServer Members
Overload List
MBO.Server.IServer.UpdateData(System.String, System.String, System.Data.DataTable, MBO.ICancelTracker, MBO.UpdateDataOptions, System.String)